home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "*\A..\..\codeV1\DynaRecord.vbp"
- Begin VB.Form Form1
- BorderStyle = 3 'Fixed Dialog
- Caption = "Test DynaRec VB5"
- ClientHeight = 4650
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4650
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4650
- ScaleWidth = 4650
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin VB.Timer Timer1
- Interval = 1
- Left = 4080
- Top = 1200
- End
- Begin VB.Frame Frame2
- Caption = "Error returned"
- Height = 975
- Left = 0
- TabIndex = 5
- Top = 3600
- Width = 3855
- Begin VB.Label Label2
- Caption = "Label2"
- Height = 615
- Left = 120
- TabIndex = 6
- Top = 240
- Width = 3615
- End
- End
- Begin VB.Frame Frame1
- Caption = "Control"
- Height = 3615
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 3855
- Begin VB.ComboBox Combo3
- Height = 315
- Left = 1680
- Style = 2 'Dropdown List
- TabIndex = 12
- Top = 1680
- Width = 1815
- End
- Begin VB.ComboBox Combo2
- Height = 315
- Left = 1680
- Style = 2 'Dropdown List
- TabIndex = 11
- Top = 1320
- Width = 1815
- End
- Begin VB.ComboBox Combo1
- Height = 315
- Left = 1680
- Style = 2 'Dropdown List
- TabIndex = 10
- Top = 960
- Width = 1815
- End
- Begin VB.CommandButton Command2
- Caption = "Stop Record"
- Height = 375
- Left = 2040
- TabIndex = 4
- Top = 2160
- Width = 1215
- End
- Begin VB.CommandButton Command1
- Caption = "RECORD"
- Height = 375
- Left = 360
- TabIndex = 3
- Top = 2160
- Width = 1215
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 240
- TabIndex = 1
- Text = "c:\test.wav"
- Top = 480
- Width = 3255
- End
- Begin VB.Label Label7
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "label7"
- Height = 255
- Left = 1680
- TabIndex = 18
- Top = 3120
- Width = 1815
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- Caption = "Length MS:"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 17
- Top = 3120
- Width = 1575
- End
- Begin VB.Label Label6
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "label6"
- Height = 255
- Left = 1680
- TabIndex = 16
- Top = 2880
- Width = 1815
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- Caption = "Length HMS:"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 15
- Top = 2880
- Width = 1575
- End
- Begin VB.Label Label5
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "label5"
- Height = 255
- Left = 1680
- TabIndex = 14
- Top = 2640
- Width = 1815
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- Caption = "State:"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 13
- Top = 2640
- Width = 1575
- End
- Begin VB.Label Label3
- BorderStyle = 1 'Fixed Single
- Caption = "Quality Frequency"
- Height = 255
- Index = 2
- Left = 240
- TabIndex = 9
- Top = 1680
- Width = 1455
- End
- Begin VB.Label Label3
- BorderStyle = 1 'Fixed Single
- Caption = "Quality Channels"
- Height = 255
- Index = 1
- Left = 240
- TabIndex = 8
- Top = 1320
- Width = 1455
- End
- Begin VB.Label Label3
- BorderStyle = 1 'Fixed Single
- Caption = "Quality Bits"
- Height = 255
- Index = 0
- Left = 240
- TabIndex = 7
- Top = 960
- Width = 1455
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "Indicate the path and filename to record"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 240
- TabIndex = 2
- Top = 240
- Width = 3255
- End
- End
- Begin DynaRecord.DynaRecordX DynaRecordX1
- Height = 615
- Left = 3960
- Top = 0
- Width = 615
- _ExtentX = 1085
- _ExtentY = 1085
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim Flag As Integer
- Private Sub Command1_Click()
- DynaRecordX1.User_Name = ""
- DynaRecordX1.User_Password = 0
- DynaRecordX1.RecFilename = Text1.Text
- DynaRecordX1.RecBits = Val(Combo1.Text)
- DynaRecordX1.RecChannels = Val(Combo2.Text)
- DynaRecordX1.RecFrequency = Val(Combo3.Text)
- Flag = DynaRecordX1.Record
- If Flag = 0 Then MsgBox "Record return error"
- End Sub
- Private Sub Command2_Click()
- Flag = DynaRecordX1.StopRec
- If Flag = 0 Then MsgBox "StopRecord return error"
- Label6.Caption = DynaRecordX1.RecLengthHMS
- Label7.Caption = DynaRecordX1.RecLengthMs
- End Sub
- Private Sub DynaRecordX1_DynaError(ErrorCode As Long, ErrorString As String)
- Label2.Caption = ErrorString
- End Sub
- Private Sub DynaRecordX1_DynaStateChanged()
- Label5.Caption = DynaRecordX1.RecState
- If Label5.Caption = "recording" Then
- Label5.BackColor = RGB(255, 0, 0)
- Else
- Label5.BackColor = RGB(255, 255, 255)
- End If
- End Sub
- Private Sub Form_Load()
- 'Init Record Quality
- Combo1.AddItem "8" 'Bits
- Combo1.AddItem "16" 'Bits
- Combo1.ListIndex = 0
- Combo2.AddItem "2" 'Stereo
- Combo2.AddItem "1" 'Mono
- Combo2.ListIndex = 0
- Combo3.AddItem "44100" 'Freq
- Combo3.AddItem "22050" 'Freq
- Combo3.AddItem "11025" 'Freq
- Combo3.ListIndex = 0
- Label5.Caption = DynaRecordX1.RecState
- End Sub
- Private Sub Timer1_Timer()
- Label6.Caption = DynaRecordX1.RecLengthHMS
- Label7.Caption = DynaRecordX1.RecLengthMs
- End Sub
-